package org.apache.ibatis.logging;

import java.lang.reflect.Constructor;

/**
 * @Author com.alibaba.lizhen
 * @Date 2021/3/7 7:56 下午
 * @Version 1.0
 * @Description
 */
public class A {
    public A() {
        System.out.println("1");
    }

    public A(String s) {
        System.out.println(s);
    }

    public A(String s, int a) {
        System.out.println(s + " " + a);
    }

    public static void main(String[] args) throws Exception {
        Constructor<A> constructor = A.class.getConstructor(null);
        constructor.newInstance(null);

        constructor = A.class.getConstructor(String.class);
        constructor.newInstance("11111");


        constructor = A.class.getConstructor(String.class,int.class);
        constructor.newInstance("11111",2);
        constructor.newInstance(new Object[]{"111",2});

        System.out.println(A.class.getName());
    }
}
